TimePunch Holiday Service
This service gains access to the public holiday definitions in TimePunch.
GetCountries
Using this method all countries and regions, that are stored in TimePunch for holiday calculation, will be returned.
CountryDto[] GetCountries(
out TpFault fault,
TpAuthentication authentication);
Needed Permission | publicHolidays@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return Value | List of all defined Countries |
GetPublicHolidays
This method loads all holidays of the given country with the defined year.
PublicHolidayDto[] GetPublicHolidays(
out TpFault fault,
TpAuthentication authentication,
Guid countryId,
int year);
Needed Permission | publicHolidays@access | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
countryId | Id of the country to load the holidays | |
year | Year to load the holidays | |
Return Value | List of all defined holidays |
SavePublicHolidays
This method saves the holidays passed to the country and year defined.
void SavePublicHolidays(
out TpFault fault,
TpAuthentication authentication,
Guid countryId,
int year,
PublicHolidayDto[] publicHolidayDtos)
Needed Permission | publicHolidays@manage | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
countryId | Id of the country to load the holidays | |
year | Year to save the holidays |
ExportPublicHolidays
This method exports all public holidays from TimePunch. The difference to the load method is that not only the holidays of the loaded year and country, but all holidays are returned.
PublicHolidayDto[] ExportPublicHolidays(
out TpFault fault,
TpAuthentication authentication)
Needed Permission | publicHolidays@export | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
Return Value | List of all defined holidays |
ImportPublicHolidays
This method imports all public holidays from TimePunch. The difference to the storage method is that not only the holidays of the loaded year and country, but all holidays are stored.
void ImportPublicHolidays(
out TpFault fault,
TpAuthentication authentication,
PublicHolidayDto[] publicHolidayDtos)
Needed Permission | publicHolidays@import | |
---|---|---|
Name | Modifier | Description |
fault | Out | Contains the error if an exception occurs. |
authentication | User authentication | |
publicHolidayDtos | List of public holidays to import |